/**
 *  文件名:ActivityFriend.java
 *  修改人:lihangjie
 *  创建时间:2015-8-28 上午2:38:24
 */
package com.sharemob.tinchat.modules.home;

import java.util.ArrayList;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.sharemob.tinchat.R;
import com.sharemob.tinchat.base.BaseFragment;
import com.sharemob.tinchat.base.FriendItem;
import com.sharemob.tinchat.base.ListAdapterForFriend;

/**
 * 
 * <一句话功能简述>
 *
 * @author lihangjie
 * version [版本号,2015-8-28 上午2:38:24]
 * @see    [相关类/方法]
 * @since  [产品/模块版本]
 *
 */
public class FragmentFriend extends BaseFragment {
    private ListView infoListView=null;
    private ListAdapterForFriend listAdapter=null;
    
    
	public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
		
		return inflater.inflate(R.layout.fragment_friend_tab, container,false);
	}

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
	   
        listAdapter=new ListAdapterForFriend();
        infoListView=(ListView)getView().findViewById(R.id.listView_friends); 
        final ArrayList<FriendItem> list = new  ArrayList< FriendItem>();
        
        FriendItem friend=new FriendItem();
        friend.setHeader_resid(R.drawable.introduce_bg3);
        friend.setId("1001");
//        friend.setAge(27);
        friend.setNickname("LeeHonGee");
        friend.setPlace("深圳市南山区海岸城");
        friend.setSex(0);
        friend.setCity("深圳");
        list.add(friend);
        
        listAdapter.setAdapter(list);
        infoListView.setAdapter(listAdapter);
	}

	@Override
	protected void keyEventOfListView(int position, int id) {
		// TODO Auto-generated method stub
		
	}


}
